<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<head>
    <meta charset="utf-8"/>
    <title>订单详情</title>
    <%@ include file="/common/styles.jsp" %>
</head>
<body>

<s:action name="product-order!view" executeResult="false" namespace="/h5" var="view"/>

<div class="pg-confirmorder f-fs2">
<div class="m-address">
    <p class="name">${view.productOrder.addrName} ${view.productOrder.addrMobile}</p>
    <p class="u-addr">${view.productOrder.province}${view.productOrder.city}${view.productOrder.district} ${view.productOrder.address}</p>
    </div>
</div>

<div class="pg-order-view f-fs2">
    <div class="u-product">
        <div class="u-hd">
            <span>商品</span>
            <span class="f-fr f-c-danger">
                ${view.productOrder.statements}
            </span>
        </div>
        <div class="u-bd">
            <s:action name="order-item!list" executeResult="false" namespace="/h5" var="orderItemList">
                <s:param name="query.order">addTime</s:param>
                <s:param name="query.desc">true</s:param>
                <s:param name="query.productOrderId">${view.productOrder.id}</s:param>
                <s:param name="query.enabled">true</s:param>
            </s:action>
            <s:iterator value="%{#orderItemList.orderItems}" var="orderItem" status="rowStatus">
                <div class="u-pro">
                    <img src="${orderItem.product.img}!icon.jpg">
                    <div class="u-tex">
                        <p>${util:preview(orderItem.product.name,false,10)}</p>
                        <p><span>颜色：${orderItem.productItem.title}</span></p>
                        <p>
                            <span class="f-fl">￥${orderItem.productItem.price}/㎡</span>
                            <span class="f-fr">x${orderItem.quantity}</span>
                        </p>
                    </div>
                </div>
            </s:iterator>
        </div>
    </div>
    
    <div class="pg-confirmorder  f-fs2" style="margin-top: 10px;">
        <div class="u-tol">
        <div class="item">
            <label>卡券</label>
            <span class="u-price">
                 <c:if test="${view.productOrder.userCoupon!=null}">
                     ${view.productOrder.userCoupon.coupon.title}
                 </c:if>
                <c:if test="${view.productOrder.userCoupon==null}">
                    未使用卡券
                </c:if>
            </span>
        </div>
        </div>
    </div> 
    
    <div class="u-product">
        <div class="u-hd">
            <span>结算详情</span>
        </div>
    <div class="u-info">
        <div class="pay">
            <p><label>商品总价</label>￥${view.productOrder.origPrice}</p>
            <p><label>优惠减免</label> -￥${view.productOrder.coupon}</p>
            <c:if test="${view.productOrder.additionalOrder!=null && view.productOrder.additionalOrder.price!=null}">
                <p><label>追加金额</label> ￥${view.productOrder.additionalOrder.price}</p>
            </c:if>

        </div>
        <div class="payb">
            <c:if test="${view.productOrder.additionalOrder!=null && view.productOrder.additionalOrder.price!=null}">
                <span>合计: ￥${view.productOrder.price+view.productOrder.additionalOrder.price}</span>
            </c:if>
            <c:if test="${view.productOrder.additionalOrder==null}">
                <span>合计: ￥${view.productOrder.price}</span>
            </c:if>
        </div>
    </div>
</div>

    <div class="pg-confirmorder  f-fs2" style="margin-top: 10px;">
        <div class="u-tol">
        <div class="item">
            <label>服务方式</label>
            <span class="u-price">上门服务</span>
        </div>
        </div>
    </div>
    


    <div class="u-product">
        <div class="u-hd">
            <span>订单信息</span>
        </div>
    <div class="u-ordertop" style="margin-top: 10px;">
        <div class="u-bd">
            <%--<p><label>下单时间: </label><s:date name="%{#view.productOrder.addTime}" format="yyyy-MM-dd HH:mm"></s:date></p>--%>
            <p><label>订单编号: </label>${view.productOrder.no}</p>
            <c:if test="${view.productOrder.payment!=null}">
                <p><label>付款方式：</label><c:if test="${view.productOrder.payment==0}">支付宝</c:if><c:if test="${view.productOrder.payment==1}">微信</c:if></p>
            </c:if>

            <s:action name="order-step!list" executeResult="false" namespace="/h5" var="orderStepList">
                <s:param name="query.order">addTime</s:param>
                <s:param name="query.desc">false</s:param>
                <s:param name="query.productOrderId">${view.productOrder.id}</s:param>
                <s:param name="query.enabled">true</s:param>
            </s:action>
            <s:iterator value="%{#orderStepList.orderSteps}" var="orderStep" status="rowStatus">
                <p><label>${orderStep.content}时间：</label><s:date name="%{#orderStep.addTime}" format="yyyy-MM-dd HH:mm:ss"></s:date></p>
            </s:iterator>
            <%--<p><label>付款时间：</label>2017-09-09  12:12:12</p>--%>
            <%--<p><label>联系时间：</label>2017-08-09  13:13:13</p>--%>
            <%--<p><label>量房时间：</label>2017-08-09 13:13:13</p>--%>
            <%--<p><label>追加时间：</label>2017-08-09 13:13:13</p>--%>
            <%--<p><label>施工结束时间：</label>2017-08-09 13:13:13</p>--%>
            <%--<p><label>验收完成时间：</label>2017-08-09 13:13:13</p>--%>
            <%--<p><label>评价时间：</label>2017-08-09 13:13:13</p>--%>
        </div>
    </div>
</div>
</div>

<%@ include file="/common/scripts.jsp" %>

<script>

    
</script>

</body>

</html>
